use "Data_Appendix_C.dta", clear

	
	* Table C1
	reg dk_estate_tax t_w i.round, cluster(respondent_id)
	outreg2 using table_C1,  word  bd(3) sd(3) rd(3) alpha(0.01, 0.05, 0.1) symbol(**, *, +)  lab replace
	
	reg dk_estate_tax i.t_w##c.pol_know i.round, cluster(respondent_id)
		outreg2 using table_C1,  word  bd(3) sd(3) rd(3) alpha(0.01, 0.05, 0.1) symbol(**, *, +)  lab append
	
	reg dk_capital_gains t_w i.round, cluster(respondent_id)
	outreg2 using table_C1,  word  bd(3) sd(3) rd(3) alpha(0.01, 0.05, 0.1) symbol(**, *, +)  lab append
	
	reg dk_capital_gains i.t_w##c.pol_know i.round, cluster(respondent_id)
		outreg2 using table_C1,  word  bd(3) sd(3) rd(3) alpha(0.01, 0.05, 0.1) symbol(**, *, +)  lab append
	
	reg dk_abortion t_w i.round, cluster(respondent_id)
	outreg2 using table_C1,  word  bd(3) sd(3) rd(3) alpha(0.01, 0.05, 0.1) symbol(**, *, +)  lab append
	
	reg dk_abortion i.t_w##c.pol_know i.round, cluster(respondent_id)
		outreg2 using table_C1,  word  bd(3) sd(3) rd(3) alpha(0.01, 0.05, 0.1) symbol(**, *, +)  lab append
	

	
		** measure of political knowledge
	recode pol_know (0 1=1) (2 3=2) (4 5=3), g(pk3)

	
	* Table C2
	reg estate_tax_support t_w i.round, cluster(respondent_id)
		outreg2 using table_C2,  word  bd(3) sd(3) rd(3) alpha(0.01, 0.05, 0.1) symbol(**, *, +)  lab replace
		
		reg estate_tax_support i.t_w##i.pk3 i.round, cluster(respondent_id)
		outreg2 using table_C2,  word  bd(3) sd(3) rd(3) alpha(0.01, 0.05, 0.1) symbol(**, *, +)  lab append
	
	reg capital_gains_support t_w i.round, cluster(respondent_id)
		outreg2 using table_C2,  word  bd(3) sd(3) rd(3) alpha(0.01, 0.05, 0.1) symbol(**, *, +)  lab append
		
		reg capital_gains_support i.t_w##i.pk3 i.round, cluster(respondent_id)
			outreg2 using table_C2,  word  bd(3) sd(3) rd(3) alpha(0.01, 0.05, 0.1) symbol(**, *, +)  lab append
	
	reg abortion_support t_w i.round, cluster(respondent_id)
		outreg2 using table_C2,  word  bd(3) sd(3) rd(3) alpha(0.01, 0.05, 0.1) symbol(**, *, +)  lab append
		
		reg abortion_support i.t_w##i.pk3 i.round, cluster(respondent_id)
			outreg2 using table_C2,  word  bd(3) sd(3) rd(3) alpha(0.01, 0.05, 0.1) symbol(**, *, +)  lab append
	
	

	* Figure C1
	reg estate_tax_support i.t_w##i.pk3 i.round, cluster(respondent_id)
	margins, at(pk3=(1 2 3) t_w=(0 1)) saving("h3b_estate_w", replace)
	
	reg capital_gains_support i.t_w##i.pk3 i.round, cluster(respondent_id)
	margins, at(pk3=(1 2 3) t_w=(0 1)) saving("h3b_cgt_w", replace)
	
	reg abortion_support i.t_w##i.pk3 i.round, cluster(respondent_id)
	margins, at(pk3=(1 2 3) t_w=(0 1)) saving("h3b_abortion_w", replace)
	
	
	

preserve
use "h3b_estate_w", clear
g topic="Estate tax"
save "h3b_estate_w", replace
restore

preserve
use "h3b_cgt_w", clear
g topic="Capital gains tax"
save "h3b_cgt_w", replace
restore

preserve
use "h3b_abortion_w", clear
g topic="Abortion"
save "h3b_abortion_w", replace
restore



use "h3b_estate_w", clear
append using "h3b_cgt_w"
append using "h3b_abortion_w"


* add a little "jitter"
replace _at2=.90 if _at2==1 & _at1==0
replace _at2=1.90 if _at2==2 & _at1==0
replace _at2=2.90 if _at2==3 & _at1==0


replace _at2=1.1 if _at2==1 & _at1==1
replace _at2=2.1 if _at2==2 & _at1==1
replace _at2=3.1 if _at2==3 & _at1==1

twoway ///
(scatter _margin _at2 if _at1==0, msymbol(O) mcolor(black) lcolor(black)) ///
(scatter _margin _at2 if _at1==1, msymbol(O) mcolor(gray) lcolor(gray) lpattern(solid)) ///
(rspike _ci_lb _ci_ub _at2 if _at1==0,  lcolor(black)  lwidth(medthick)) ///
(rspike _ci_lb _ci_ub _at2 if _at1==1, lcolor(gray)  lwidth(medthick)), ///
by(topic, r(1) note("") title("", size(large) position(11))) subtitle(,  size(medsmall)) ///
scheme(plotplain) yline(.5) legend(pos(6) col(2) title("")  order(1 2) label(1 "No DK-option") label(2 "DK-option")) xlabel(1 "Low" 2 "Med" 3 "High", labsize(medsmall)  labcolor(gray) tlength(0.5)) xtick(1 2 3) ylabel(0.2(.1)0.7, labsize(medsmall) labcolor(gray)) xtitle("Political knowledge", size(medsmall) color(gray)) ytitle("Policy support", size(medsmall) color(gray)) xsize(8)

graph export "figureC1.pdf",  replace
